<?php
/**
 * Settings Controller
 */
namespace PUF\Plugin;

class Settings extends \PUF\Controller {
	
	
	protected function _before() {
		parent::_before();
		$this->View->setTitle('Administración - Configuración');
		
		$Loader = \PUF\Loader::getInstance();
		$Loader->load('Crud', ['type' => 'model', 'plugin' => 'Admin']);
	}
	
	public function home() {
		$this->View->setLayout('default', ['plugin' => 'Admin']);
		$this->View->setView('Settings/home', ['plugin' => 'Admin']);
		
		$cruds = Crud::find();

		if ($cruds->hasNext()) {
			// TODO ir a funcion que muestre los cruds
		}
	}
}